﻿package mortal.game.view.LineOffReward.data
{
    import Message.DB.Tables.*;
    import com.gengine.resource.*;
    import mortal.game.view.common.*;

    public class LineOffRewardConfig extends Object
    {
        public var lineOffCopyReward:Object;
        private static var _instance:LineOffRewardConfig;

        public function LineOffRewardConfig()
        {
            this.lineOffCopyReward = {};
            this.init();
            return;
        }// end function

        private function init() : void
        {
            var _loc_1:* = ConfigManager.instance.getJSONByFileName("t_offline_copy_compensate.json");
            this.wirteCopy(_loc_1);
            return;
        }// end function

        private function wirteCopy(param1:Object) : void
        {
            var _loc_2:Object = null;
            var _loc_3:TOfflineCopyCompensate = null;
            for each (_loc_2 in param1)
            {
                
                _loc_3 = new TOfflineCopyCompensate();
                ClassTypesUtil.copyValue(_loc_3, _loc_2);
                this.lineOffCopyReward[_loc_3.id] = _loc_3;
            }
            return;
        }// end function

        public function getCfgById(param1:int) : TOfflineCopyCompensate
        {
            return this.lineOffCopyReward[param1];
        }// end function

        public static function get instance() : LineOffRewardConfig
        {
            if (_instance == null)
            {
                _instance = new LineOffRewardConfig;
            }
            return _instance;
        }// end function

    }
}
